libxl: Fix an ao completion bug; document locking policy
Document the concurrent access policies for libxl__ao and libxl__egc,
and their corresponding gcs.
Fix a violation of the policy:
If an ao was submitted and a callback requested, and while the
initiating function was still running on the original thread, the ao
is completed on another thread, the completing thread would improperly
concurrently access the ao with the initiating thread.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>